<?php

namespace services\hiss;

use common\models\hiss\Model;
use common\models\member\Attr;
use common\models\member\Member;
use common\models\patient\User;
use Yii;
use common\components\Service;

/**
 * Class ConfigService
 * @package services\patient
 */
class ConfigService extends Service
{
    const PROJECT = [
        'hy' => 1,
        'bd' => 3,
        'rj' => 4,
        'nb' => 5,
        'cs' => 6,
        'nc' => 7,
        'wz' => 8,
        'nt' => 9,
        'gz' => 10,
        'hk' => 11,
        'hz' => 12,
    ];

    // 渠道映射配置   hiss中的表  jg_qudao   baiyou中的表  by_marketing_source_channel
    const SOURCE_CHANNEL = [
        self::PROJECT['hy'] => [
            '1' => 5, '2' => 1, '3' => 6, '4' => 4, '5' => 7, '6' => 3, '7' => 8, '8' => 9, '9' => 10, '10' => 11, '11' => 12, '12' => 13, '13' => 14, '14' => 15, '15' => 16
        ], self::PROJECT['bd'] => [
            // 1：市场转诊, 2：网络, 3：电视, 4：户外, 5：介绍, 6：路过, 7：第三方数据, 8：渠道
            '1' => 17, '2' => 18, '3' => 19, '4' => 20, '5' => 21, '6' => 22, '7' => 23, '8' => 24
        ], self::PROJECT['rj'] => [
            // 1：市场转诊, 2：网络, 3：电视, 4：户外, 5：介绍, 6：路过, 7：第三方数据, 8：渠道
            '1' => 33, '2' => 34, '3' => 35, '4' => 36, '5' => 37, '6' => 38, '7' => 39, '8' => 40
        ], self::PROJECT['nb'] => [
            // 1：市场转诊, 2：网络, 3：电视, 4：户外, 5：介绍, 6：路过, 7：第三方数据
            '1' => 79, '2' => 80, '3' => 81, '4' => 82, '5' => 83, '6' => 84, '7' => 85
        ], self::PROJECT['cs'] => [
            // 1：市场转诊, 2：网络, 3：电视, 4：户外, 5：介绍, 6：路过, 7：第三方数据
            '1' => 65, '2' => 66, '3' => 67, '4' => 68, '5' => 69, '6' => 70, '7' => 71
        ], self::PROJECT['nc'] => [
            // 9：市场转诊, 10：网络, 11：电视, 12：户外, 13：介绍, 14：路过, 15：第三方数据, 16：渠道
            '9' => 41, '10' => 42, '11' => 43, '12' => 44, '13' => 45, '14' => 46, '15' => 47, '16' => 48
        ], self::PROJECT['wz'] => [
            // 1：市场转诊, 2：网络, 3：电视, 4：户外, 5：介绍, 6：路过, 7：第三方数据
            '1' => 49, '2' => 50, '3' => 51, '4' => 52, '5' => 53, '6' => 54, '7' => 55
        ], self::PROJECT['nt'] => [
            // 1：市场, 2：网络, 3：电视, 4：户外, 5：朋友介绍, 6：复诊介绍, 7：路过, 8：第三方数据, 9：老病人
            '1' => 56, '2' => 57, '3' => 58, '4' => 59, '5' => 60, '6' => 61, '7' => 62, '8' => 63, '9' => 64
        ], self::PROJECT['gz'] => [
            // 1：市场, 2：网络, 3：电视, 4：户外, 5：介绍, 6：路过, 7：第三方数据, 8：附近, 9：网络自来
            '1' => 86, '2' => 87, '3' => 88, '4' => 89, '5' => 90, '6' => 91, '7' => 92, '8' => 93, '9' => 94
        ], self::PROJECT['hk'] => [
            // 1：市场转诊, 2：网络, 3：电视, 4：户外, 5：介绍, 6：路过, 7：第三方数据, 8：渠道
            '1' => 95, '2' => 96, '3' => 97, '4' => 98, '5' => 99, '6' => 100, '7' => 101, '8' => 102
        ]
    ];

    // 病种映射配置   hiss中的表  jg_illtype   baiyou中的表  by_base_patient_diseases
    const PATIENT_DISEASES = [
        self::PROJECT['hy'] => [
            '1' => 1, '11' => 3, '5' => 3, '2' => 2, '3' => 2, '4' => 2, '6' => 2, '12' => 2, '13' => 2
        ], self::PROJECT['bd'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 7：牛皮癣, 17：白色糠疹, 18：斑驳病, 19：老年斑, 20：贫血痣, 21：进行性斑状色素减少症, 22：疤痕
            '1' => 1, '2' => 2, '3' => 2, '4' => 2, '7' => 3, '17' => 2, '18' => 2, '19' => 2, '20' => 2, '21' => 2, '22' => 2
        ], self::PROJECT['rj'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 5：非白
            '1' => 1, '2' => 2, '3' => 2, '4' => 2, '5' => 3
        ], self::PROJECT['nb'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 5：非白, 6：白斑待查, 7：皮杂
            '1' => 1, '2' => 2, '3' => 2, '4' => 2, '5' => 3, '6' => 2, '7' => 3
        ], self::PROJECT['cs'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 5：非白, 6：其他, 7：牛皮癣, 8：湿疹, 13：过敏, 14：皮杂, 17：咨询
            '1' => 1, '2' => 2, '3' => 2, '4' => 2, '5' => 3, '6' => 2, '7' => 3, '8' => 2, '13' => 2, '14' => 3, '17' => 2
        ], self::PROJECT['nc'] => [
            // 17：白癜风, 18：花斑癣, 19：色素脱失, 20：无色素痣, 33：特异点状白斑, 35：白色糠疹, 36：斑驳病, 37：贫血痣, 38：皮杂
            '17' => 1, '18' => 2, '19' => 2, '20' => 2, '33' => 2, '35' => 2, '36' => 2, '37' => 2, '38' => 3
        ], self::PROJECT['wz'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 5：非白
            '1' => 1, '2' => 2, '3' => 2, '4' => 2, '5' => 3
        ], self::PROJECT['nt'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 5：非白, 6：其他, 7：银屑病, 8：湿疹, 9：痤疮, 10：荨麻疹, 11：尖锐湿疣,
            // 12：扁平疣, 13：过敏, 14：皮杂, 15：脱发, 16：灰指甲, 17：疱疹, 18：皮炎, 19：疥疮, 20：皮肤瘙痒症, 21：玫瑰糠疹,
            // 22：体、股癣, 23：毛囊炎, 24：结节性痒疹, 25：阴虱, 26：点状白斑, 27：晕痣, 28：白色糠疹, 29：传染性软疣, 30：寻常疣
            '1' => 1, '2' => 4, '3' => 5, '4' => 6, '5' => 3, '6' => 7, '7' => 8, '8' => 9, '9' => 10, '10' => 11, '11' => 12,
            '12' => 13, '13' => 14, '14' => 15, '15' => 16, '16' => 17, '17' => 18, '18' => 19, '19' => 20, '20' => 21, '21' => 22,
            '22' => 23, '23' => 24, '24' => 25, '25' => 26, '26' => 27, '27' => 28, '28' => 29, '29' => 30, '30' => 31
        ], self::PROJECT['gz'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 5：非白, 6：其他, 7：银屑病, 8：湿疹, 9：青春痘, 10：荨麻疹, 11：尖锐湿疣,
            // 12：扁平疣, 13：过敏, 14：皮杂, 15：脱发, 16：灰指甲, 17：寻常疣, 18：廯类, 19：疥疮, 20：统一疣, 21：斑秃,
            // 22：疣类, 23：痤疮, 24：斑类, 25：糠疹 26：疱疹, 27：毛囊炎, 28：毛周角化, 29：跖疣, 30：鱼鳞病,
            // 31：疥疮, 32：甲沟炎, 33：白斑, 34：糠疹 35：晕痣, 36：老年斑, 37：色素减退
            '1' => 1, '2' => 4, '3' => 5, '4' => 6, '5' => 3, '6' => 7, '7' => 8, '8' => 9, '9' => 32, '10' => 11, '11' => 12,
            '12' => 13, '13' => 14, '14' => 15, '15' => 16, '16' => 17, '17' => 31, '18' => 33, '19' => 20, '20' => 34, '21' => 35,
            '22' => 36, '23' => 10, '24' => 37, '25' => 38, '26' => 18, '27' => 24, '28' => 39, '29' => 40, '30' => 41,
            '31' => 20, '32' => 42, '33' => 43, '34' => 38, '35' => 28, '36' => 44, '37' => 45
        ], self::PROJECT['hk'] => [
            // 1：白癜风, 2：花斑癣, 3：色素脱失, 4：无色素痣, 5：牛皮癣, 6：白色糠疹, 7：斑驳病, 8：老年斑, 9：贫血痣, 10：进行性斑状色素减少症, 11：疤痕, 12：其他, 13：其他, 14：无特定治疗手段类白斑
            // (原版)'1' => 1, '2' => 2, '3' => 2, '4' => 2, '5' => 3, '6' => 2, '7' => 2, '8' => 2, '9' => 2, '10' => 2, '11' => 2, '12' => 2, '13' => 2, '14' => 2,
            1 => [
                'parent' => 1,
                'child' => 0
            ],
            2 => [
                'parent' => 2,
                'child' => 4
            ],
            3 => [
                'parent' => 2,
                'child' => 5
            ],
            4 => [
                'parent' => 2,
                'child' => 6
            ],
            5 => [
                'parent' => 3,
                'child' => 117
            ],
            6 => [
                'parent' => 2,
                'child' => 29
            ],
            7 => [
                'parent' => 2,
                'child' => 100
            ],
            8 => [
                'parent' => 2,
                'child' => 44
            ],
            9 => [
                'parent' => 2,
                'child' => 101
            ],
            10 => [
                'parent' => 0,
                'child' => 0
            ],
            11 => [
                'parent' => 0,
                'child' => 0
            ],
            12 => [
                'parent' => 2,
                'child' => 47
            ],
            13 => [
                'parent' => 2,
                'child' => 47
            ],
            14 => [
                'parent' => 0,
                'child' => 0
            ],
        ]
    ];

    // 标签映射配置   hiss中的表  jg_patient_label   baiyou中的表  by_marketing_tags
    const PATIENT_LABEL = [
        self::PROJECT['hy'] => [
            '1' => 2, '2' => 3, '3' => 1, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, '10' => 10
        ], self::PROJECT['bd'] => [

        ], self::PROJECT['rj'] => [

        ], self::PROJECT['nb'] => [

        ], self::PROJECT['cs'] => [

        ], self::PROJECT['nc'] => [

        ], self::PROJECT['wz'] => [

        ], self::PROJECT['nt'] => [

        ], self::PROJECT['gz'] => [

        ], self::PROJECT['hk'] => [

        ]
    ];

    // 就诊类型   hiss中的表  复诊：jg_patient_state， 治疗：jg_treat_type   baiyou中的表  by_marketing_outpatient_type
    const OUTPATIENT_TYPE = [
        self::PROJECT['hy'] => [
            'hiss_fz' => ['1' => 1003, '3' => 1002, '4' => 1001, '6' => 1001, '7' => 1003, '8' => 1001, '11' => 1003, '12' => 1003],
            'hiss_zl' => ['1' => 1001, '2' => 1001],
        ], self::PROJECT['bd'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：停治疗=>复诊, 7：治愈=>复诊, 8：敏感=>断诊, 9：正常复诊=>复诊, 10：术后=>复诊, 16：客服跟踪=>断诊
            'hiss_fz' => ['1' => 1006, '2' => 1006, '3' => 1007, '4' => 1008, '5' => 1008, '6' => 1008, '7' => 1008, '8' => 1006, '9' => 1008, '10' => 1008, '16' => 1006],
            // 1：抗复发, 2：药浴
            'hiss_zl' => ['1' => 1008],
        ], self::PROJECT['rj'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：停治疗=>复诊, 7：治愈=>复诊, 8：敏感=>断诊, 9：正常复诊=>复诊, 10：术后=>复诊
            'hiss_fz' => ['1' => 1011, '2' => 1011, '3' => 1012, '4' => 1013, '5' => 1013, '6' => 1013, '7' => 1013, '8' => 1011, '9' => 1013, '10' => 1013],
            // 1：抗复发, 3：复发, 7：稳定期, 8：进展期, 9：留观, 10：流回, 11：家用光疗
            'hiss_zl' => ['1' => 1013, '3' => 1013, '7' => 1013, '8' => 1013, '9' => 1013, '10' => 1013, '11' => 1013],
        ], self::PROJECT['nb'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：治愈=>复诊, 7：敏感=>断诊, 8：正常复诊=>复诊, 9：术后=>复诊
            'hiss_fz' => ['1' => 1043, '2' => 1043, '3' => 1042, '4' => 1041, '5' => 1041, '6' => 1041, '7' => 1043, '8' => 1041, '9' => 1041],
            //
            'hiss_zl' => [],
        ], self::PROJECT['cs'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：停治疗=>复诊, 7：治愈=>复诊, 8：敏感=>断诊, 9：正常复诊=>复诊, 10：术后=>复诊, 11：客服跟踪=>断诊
            'hiss_fz' => ['1' => 1031, '2' => 1031, '3' => 1032, '4' => 1033, '5' => 1033, '6' => 1033, '7' => 1033, '8' => 1031, '9' => 1033, '10' => 1033, '11' => 1031],
            //
            'hiss_zl' => [],
        ], self::PROJECT['nc'] => [
            // 2：断诊, 3：放弃, 4：流失, 5：抗复发, 6：停药, 7：停治疗, 8：治愈, 9：敏感, 10：正常复诊, 11：术后
            'hiss_fz' => ['2' => 1016, '3' => 1016, '4' => 1017, '5' => 1018, '6' => 1018, '7' => 1018, '8' => 1018, '9' => 1016, '10' => 1018, '11' => 1018],
            //
            'hiss_zl' => [],
        ], self::PROJECT['wz'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：治愈=>复诊, 7：敏感=>断诊, 8：正常复诊=>复诊, 9：术后=>复诊
            'hiss_fz' => ['1' => 1021, '2' => 1021, '3' => 1022, '4' => 1023, '5' => 1023, '6' => 1023, '7' => 1021, '8' => 1023, '9' => 1023],
            //
            'hiss_zl' => [],
        ], self::PROJECT['nt'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：停治疗=>复诊, 7：治愈=>复诊, 8：敏感=>断诊, 9：正常复诊=>复诊, 10：术后=>复诊, 11：部分治愈=>复诊, 12：潜在断诊=>复诊
            'hiss_fz' => ['1' => 1026, '2' => 1026, '3' => 1027, '4' => 1028, '5' => 1028, '6' => 1028, '7' => 1028, '8' => 1026, '9' => 1028, '10' => 1028, '11' => 1028, '12' => 1028],
            // 6：持续有效=>, 7：边治边发=>, 8：疗效迟缓=>, 9：完全无效=>, 10：越治越重=>, 11：愈后复发=>, 12：未经治疗=>, 13：首次治疗=>, 14：已经治愈=>
            'hiss_zl' => ['6' => 1028, '7' => 1028, '8' => 1028, '9' => 1028, '10' => 1028, '11' => 1028, '12' => 1028, '13' => 1028, '14' => 1028],
        ], self::PROJECT['gz'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：治愈=>复诊, 7：敏感=>断诊, 8：正常复诊=>复诊, 9：术后=>复诊
            'hiss_fz' => ['1' => 1046, '2' => 1046, '3' => 1047, '4' => 1048, '5' => 1048, '6' => 1048, '7' => 1046, '8' => 1048, '9' => 1048],
            //
            'hiss_zl' => [],
        ], self::PROJECT['hk'] => [
            // 1：断诊=>断诊, 2：放弃=>断诊, 3：流失=>流失, 4：抗复发=>复诊, 5：停药=>复诊, 6：停治疗=>断诊, 7：治愈=>复诊, 8：敏感=>断诊, 9：正常复诊=>复诊, 10：术后=>复诊, 11：客服跟踪=>复诊
            'hiss_fz' => ['1' => 1003, '2' => 1003, '3' => 1002, '4' => 1001, '5' => 1001, '6' => 1003, '7' => 1001, '8' => 1003, '9' => 1001, '10' => 1001, '11' => 1001],
            //
            'hiss_zl' => [],
        ]
    ];

    // 效果类型
    const EFFECT_TYPE = [
        self::PROJECT['hy'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['bd'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['rj'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['nb'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['cs'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['nc'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['wz'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['nt'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['gz'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['hk'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ]
    ];

    // 风控类型
    const RISK_TYPE = [
        self::PROJECT['hy'] => [
            'hiss_fz' => ['7' => 1, '12' => 4],
            'hiss_zl' => []
        ], self::PROJECT['bd'] => [
            'hiss_fz' => ['8' => 8],
            'hiss_zl' => []
        ], self::PROJECT['rj'] => [
            'hiss_fz' => ['8' => 12],
            'hiss_zl' => []
        ], self::PROJECT['nb'] => [
            'hiss_fz' => ['7' => 37],
            'hiss_zl' => []
        ], self::PROJECT['cs'] => [
            'hiss_fz' => ['8' => 29],
            'hiss_zl' => []
        ], self::PROJECT['nc'] => [
            'hiss_fz' => ['9' => 16],
            'hiss_zl' => []
        ], self::PROJECT['wz'] => [
            'hiss_fz' => ['7' => 21],
            'hiss_zl' => []
        ], self::PROJECT['nt'] => [
            'hiss_fz' => [],
            'hiss_zl' => []
        ], self::PROJECT['gz'] => [
            'hiss_fz' => ['7' => 41],
            'hiss_zl' => []
        ], self::PROJECT['hk'] => [
            'hiss_fz' => ['8' => 45],
            'hiss_zl' => []
        ]
    ];

    // 诊疗评估
    const CLINIC_ASSESS = [
        self::PROJECT['hy'] => [
            'hiss_fz' => ['6' => 4],
            'hiss_zl' => ['2' => 3],
        ], self::PROJECT['bd'] => [
            'hiss_fz' => ['7' => 5],
            'hiss_zl' => [],
        ], self::PROJECT['rj'] => [
            'hiss_fz' => ['7' => 9],
            'hiss_zl' => [],
        ], self::PROJECT['nb'] => [
            'hiss_fz' => ['6' => 33],
            'hiss_zl' => [],
        ], self::PROJECT['cs'] => [
            'hiss_fz' => ['7' => 25],
            'hiss_zl' => [],
        ], self::PROJECT['nc'] => [
            'hiss_fz' => ['8' => 13],
            'hiss_zl' => [],
        ], self::PROJECT['wz'] => [
            'hiss_fz' => ['6' => 17],
            'hiss_zl' => [],
        ], self::PROJECT['nt'] => [
            'hiss_fz' => [],
            'hiss_zl' => [],
        ], self::PROJECT['gz'] => [
            'hiss_fz' => ['6' => 37],
            'hiss_zl' => [],
        ], self::PROJECT['hk'] => [
            'hiss_fz' => ['7' => 41],
            'hiss_zl' => [],
        ]
    ];

    // 是否是抗复发
    const IS_ANTI_RELAPSE = [
        self::PROJECT['hy'] => [
            'hiss_fz' => [4, 6],
            'hiss_zl' => [],
        ], self::PROJECT['bd'] => [
            'hiss_fz' => [4, 7],
            'hiss_zl' => [],
        ], self::PROJECT['rj'] => [
            'hiss_fz' => [4, 7],
            'hiss_zl' => [],
        ], self::PROJECT['nb'] => [
            'hiss_fz' => [4, 6],
            'hiss_zl' => [],
        ], self::PROJECT['cs'] => [
            'hiss_fz' => [4, 7],
            'hiss_zl' => [],
        ], self::PROJECT['nc'] => [
            'hiss_fz' => [5, 8],
            'hiss_zl' => [],
        ], self::PROJECT['wz'] => [
            'hiss_fz' => [4, 6],
            'hiss_zl' => [],
        ], self::PROJECT['nt'] => [
            'hiss_fz' => [4, 7],
            'hiss_zl' => [],
        ], self::PROJECT['gz'] => [
            'hiss_fz' => [4, 6],
            'hiss_zl' => [],
        ], self::PROJECT['hk'] => [
            'hiss_fz' => [4, 7],
            'hiss_zl' => [],
        ]
    ];

    // 诊室配置   hiss中的表  jg_consult_room   baiyou中的表  by_clinic
    const CLINIC = [
        self::PROJECT['hy'] => [
            '1' => 6, '2' => 5, '3' => 4, '4' => 2, '5' => 1
        ], self::PROJECT['bd'] => [
            // 1：一诊, 2：二诊, 3：三诊, 4：四诊, 5：五诊, 6：六诊, 7：七诊, 8：检验科, 10：非白
            '1' => 15, '2' => 14, '3' => 13, '4' => 12, '5' => 11, '6' => 10, '7' => 9, '8' => 8, '10' => 7
        ], self::PROJECT['rj'] => [
            // 1：一诊, 2：二诊, 3：三诊, 4：七诊, 5：五诊, 6：八诊
            '1' => 22, '2' => 21, '3' => 20, '4' => 19, '5' => 18, '6' => 17,
        ], self::PROJECT['nb'] => [
            // 1：一诊, 2：二诊, 3：三诊, 4：五诊, 5：治疗室
            '1' => 41, '2' => 42, '3' => 43, '4' => 49
        ], self::PROJECT['cs'] => [
            // 1：一诊, 2：二诊, 3：三诊, 4：六诊, 6：六诊--
            '1' => 32, '2' => 33, '3' => 34, '4' => 35, '6' => 35
        ], self::PROJECT['nc'] => [
            // 11：三诊, 12：一诊, 13：二诊
            '11' => 25, '12' => 24, '13' => 23
        ], self::PROJECT['wz'] => [
            // 1：一诊, 2：二诊, 3：三诊
            '1' => 26, '2' => 27, '3' => 28
        ], self::PROJECT['nt'] => [
            // 1：三诊, 2：五诊, 3：一诊, 4：二诊, 5：专家门诊
            '1' => 30, '2' => 31, '3' => 29
        ], self::PROJECT['gz'] => [
            // 1：一诊, 2：二诊, 3：三诊,
            '1' => 44, '2' => 45, '3' => 46
        ], self::PROJECT['hk'] => [
            // 1：一诊, 2：二诊
            '1' => 47, '2' => 48
        ]
    ];

    // 诊室
    const CLINIC_ITEM = [
        // 1：一诊, 2：二诊
        '1' => ['name'=>'一诊','sort'=>1], '2' => ['name'=>'二诊','sort'=>2]
    ];

    // 治疗项目配置
    const CLINIC_PROJECT = [
        self::PROJECT['hy'] => [
            '308' => 1,
            '311' => 3
        ], self::PROJECT['bd'] => [
            '308' => 1,
            '311' => 3
        ], self::PROJECT['rj'] => [
            '308' => 1,
            '311' => 3
        ], self::PROJECT['nb'] => [
            '308' => 1,
            '311' => 3
        ], self::PROJECT['cs'] => [
            '308' => 1,
            '311' => 3
        ], self::PROJECT['nc'] => [
            '308' => 1,
            '311' => 0,
        ], self::PROJECT['wz'] => [
            '308' => 1,
            '311' => 3,
        ], self::PROJECT['nt'] => [
            '308' => 1,
            '311' => 3,
        ], self::PROJECT['gz'] => [
            '308' => 1,
            '311' => 3,
        ], self::PROJECT['hk'] => [
            '308' => 1,
            '311' => 3,
        ]
    ];

    // 回访方式   hiss中的表  jg_follow_type
    const FOLLOW_TYPE = [
        self::PROJECT['hy'] => [
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['bd'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['rj'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['nb'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['cs'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['nc'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['wz'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['nt'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['gz'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ], self::PROJECT['hk'] => [
            // 1：电话咨询， 2：QQ咨询， 3：微信咨询
            '1' => 1, '2' => 3, '3' => 2
        ]
    ];

    // 回访结果   hiss中的表  jg_follow_result  baiyou中的表  by_marketing_callback_status  回访状态都是正常回访
    const FOLLOW_RESULT = [
        self::PROJECT['hy'] => [
            'id' => [
                '1' => 3, '2' => 3, '3' => 3, '4' => 3
            ],
            'title' => [
                '1' => '正常回访', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访'
            ]
        ], self::PROJECT['bd'] => [
            // 2：无效, 3：再回访, 4：有效, 5：正常复诊, 11：非白, 12：抗复发, 14：未拨通, 16：断诊, 17：空号, 18：敏感, 19：已到诊, 20：流失
            'id' => [
                '2' => 6, '3' => 6, '4' => 6, '5' => 6, '11' => 6, '12' => 6, '14' => 6, '16' => 6, '17' => 6, '18' => 6, '19' => 6, '20' => 6
            ],
            'title' => [
                '2' => '正常回访', '3' => '正常回访', '4' => '正常回访', '5' => '正常回访', '11' => '正常回访', '12' => '正常回访',
                '14' => '正常回访', '16' => '正常回访', '17' => '正常回访', '18' => '正常回访', '19' => '正常回访', '20' => '正常回访'
            ]
        ], self::PROJECT['rj'] => [
            // 1：未接通, 2：无效, 3：再回访, 4：有效
            'id' => [
                '1' => 10, '2' => 10, '3' => 10, '4' => 10
            ],
            'title' => [
                '1' => '正常回访', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访'
            ]
        ], self::PROJECT['nb'] => [
            // 1：未接通, 2：无效, 3：再回访, 4：有效, 5：就诊中
            'id' => [
                '1' => 35, '2' => 35, '3' => 35, '4' => 35, '5' => 35
            ],
            'title' => [
                '1' => '正常回访', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访', '5' => '正常回访'
            ]
        ], self::PROJECT['cs'] => [
            // 1：未接通, 2：无效, 3：再回访, 4：有效
            'id' => [
                '1' => 27, '2' => 27, '3' => 27, '4' => 27
            ],
            'title' => [
                '1' => '正常回访', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访'
            ]
        ], self::PROJECT['nc'] => [
            // 10：无效, 11：再回访, 12：有效, 13：正常复诊, 14：再回访, 15：有效, 17：空号, 18：敏感, 19：已就诊
            'id' => [
                '10' => 15, '11' => 15, '12' => 15, '13' => 15, '14' => 15, '15' => 15, '17' => 15, '18' => 15, '19' => 15
            ],
            'title' => [
                '10' => '正常回访', '11' => '正常回访', '12' => '正常回访', '13' => '正常回访', '14' => '正常回访', '15' => '正常回访', '17' => '正常回访', '18' => '正常回访', '19' => '正常回访'
            ]
        ], self::PROJECT['wz'] => [
            // 1：未接通, 2：无效, 3：再回访, 4：有效, 5：就诊中
            'id' => [
                '1' => 19, '2' => 19, '3' => 19, '4' => 19, '5' => 19
            ],
            'title' => [
                '1' => '正常回访', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访', '5' => '正常回访'
            ]
        ], self::PROJECT['nt'] => [
            // 1：未接通, 2：无效, 3：再回访, 4：有效
            'id' => [
                '1' => 23, '2' => 23, '3' => 23, '4' => 23
            ],
            'title' => [
                '1' => '正常回访', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访'
            ]
        ], self::PROJECT['gz'] => [
            // 1：未接通, 2：无效, 3：再回访, 4：有效, 5：就诊中
            'id' => [
                '1' => 39, '2' => 39, '3' => 39, '4' => 39, '5' => 39
            ],
            'title' => [
                '1' => '正常回访', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访', '5' => '正常回访'
            ]
        ], self::PROJECT['hk'] => [
            // 1：无效, 2：再回访, 3：有效, 4：正常复诊, 5：非白, 6：抗复发, 7：未拨通, 8：断诊, 9：空号, 10：敏感, 11：已到诊, 12：流失
            'id' => [
                '1' => 300, '2' => 301, '3' => 301, '4' => 301, '5' => 301, '6' => 301, '7' => 300, '8' => 300, '9' => 300, '10' => 300, '11' => 303, '12' => 300
            ],
            'title' => [
                '1' => '未接通', '2' => '正常回访', '3' => '正常回访', '4' => '正常回访', '5' => '正常回访', '6' => '正常回访',
                '7' => '未接通', '8' => '未接通', '9' => '未接通', '10' => '未接通', '11' => '已到院', '12' => '未接通'
            ]
        ]
    ];

    // 治疗项目
    const CLINIC_PROJECT_HK = [
        'id' => [
            1 => 199,
            2 => 200,
            3 => 201,
            4 => 202,
            5 => 203,
            6 => 204,
            7 => 205,
            8 => 206,
            9 => 207,
            10 => 208,
            11 => 209,
            12 => 210,
            13 => 211,
            14 => 212,
            15 => 213,
            16 => 214,
            17 => 215,
            18 => 506,
            19 => 216,
            20 => 507,
            21 => 508,
            23 => 509,
            24 => 510,
            25 => 511,
            26 => 512,
            27 => 513,
            28 => 514,
            29 => 515,
            30 => 516,
            31 => 517,
            32 => 518,
            33 => 519,
            34 => 217,
            35 => 520,
            36 => 521,
            37 => 522,
            38 => 523,
            39 => 524,
            40 => 525,
            41 => 526,
            42 => 527,
            43 => 528,
            44 => 529,
            45 => 530,],
        'title' => [
            1 => '308',
            2 => '肢端雾化',
            3 => '半舱311',
            4 => '点阵激光',
            5 => '介入',
            6 => '脐疗',
            7 => '药浴',
            8 => '熏蒸',
            9 => '神阙',
            10 => '雾化',
            11 => '梅花针',
            12 => '表皮移植',
            13 => '自血疗法',
            14 => '透药',
            15 => '311小光疗',
            16 => '红蓝光',
            17 => '百行针',
            18 => '手术',
            19 => '三氧',
            20 => '小牛脾提取物注射液',
            21 => '胎盘多肽注射液',
            23 => '驱虫斑鸠菊注射液',
            24 => '住院',
            25 => '留观',
            26 => '五肽10mg',
            27 => '五肽1mg',
            28 => '曲安奈德',
            29 => '注射用重组人白介素-',
            30 => '倍他米松',
            31 => '氨曲南0.5g',
            32 => '氨曲南1.0g',
            33 => 'TE治疗',
            34 => '纳米促黑',
            35 => '补骨脂注射液',
            36 => '复方甘草酸苷注射液',
            37 => '灭菌注射用水2ml',
            38 => '0.9％盐水 100',
            39 => '0.9％盐水 250',
            40 => '0.9％盐水 500',
            41 => '5％葡萄糖注射液 1',
            42 => '5％葡萄糖注射液 2',
            43 => '5％葡萄糖注射液 5',
            44 => '输液室',
            45 => '红光艾炙治疗',
        ]
    ];

    // 操作员
    const HANDLE_LIST = [
        'name' => [
            1 => '吴志荣',
            13 => '吴秋爱',
            15 => '王彩雲',
            19 => '郭美英',
            20 => '郭应香（皮肤科）',
            21 => '张淡淡',
            27 => '符延玲',
            29 => '蒲小慧',
            37 => '陈雪颖',
            41 => '李妍平',
            45 => '吴勇飞',
            46 => '陈小玲',
            47 => '蔡珍珍',
            48 => '黄明凤',
            49 => '刘桂英',
            50 => '周木和',
            16 => '周心',
            18 => '柴珊珊',
            28 => '许环丽',
            30 => '梁花英',
            32 => '符海超',
            33 => '谢瑞纷',
        ],
        'id' => [
            1 => '331',
            13 => '334',
            15 => '533',
            19 => '521',
            20 => '337',
            21 => '338',
            27 => '340',
            29 => '342',
            41 => '520',
            45 => '347',
            46 => '534',
            47 => '535',
            48 => '536',
            49 => '538',
            50 => '537',
            16 => '336',
            18 => '540',
            28 => '341',
            30 => '343',
            32 => '544',
            33 => '345',
        ],
        'job' => [
            1 => '经营',
            13 => '医助',
            15 => '治疗室护士',
            19 => '导医',
            20 => '医助',
            21 => '医助',
            27 => '治疗室护士',
            29 => '导医',
            41 => '医助',
            45 => '经营',
            46 => '护士',
            47 => '护士',
            48 => '护士',
            49 => '医助',
            50 => '护士',
            16 => '护士',
            18 => '医助',
            28 => '护士',
            30 => '护士',
            32 => '医助',
            33 => '护士',
        ]
    ];

    // 治疗室
    /**
     * 1    308治疗
     * 2    311治疗
     * 3    二楼治疗区
     * 4    三楼治疗区
     * 5    理疗3室
     * 6    手术室
     * 7    药浴治疗室
     * 8    输液室
     * 9    雾化
     * 10    熏蒸
     * 11    脐疗
     * 12    肢端熏蒸
     * 13    介入
     * 14    表皮移植
     * 15    纳米微针
     * 16    红光艾炙治疗室
     * 17    神阙
     * 18    红蓝光
     */
    const TREATROOM = [
        1 => '69',
        2 => '70',
        3 => '116',
        4 => '117',
        5 => '118',
        6 => '119',
        7 => '120',
        8 => '121',
        9 => '72',
        10 => '75',
        11 => '73',
        12 => '74',
        13 => '76',
        14 => '77',
        15 => '122',
        16 => '123',
        17 => '124',
        18 => '125'
    ];


    // 断诊状态
    const DIAGNOSIS = [
        self::PROJECT['hy'] => [1],
        self::PROJECT['bd'] => [1],
        self::PROJECT['rj'] => [1],
        self::PROJECT['nb'] => [1],
        self::PROJECT['cs'] => [1],
        self::PROJECT['nc'] => [1],
        self::PROJECT['wz'] => [1],
        self::PROJECT['nt'] => [1],
        self::PROJECT['gz'] => [1],
        self::PROJECT['hk'] => [8],
    ];


}